package org.example.kg_back.controller;


import org.example.kg_back.common.result.Result;
import org.example.kg_back.service.imp.WarnFlightHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



@RestController
@RequestMapping("/api/warnFlightHistory")
public class WarnFlightHistoryController {

	@Autowired
	private WarnFlightHistoryService service;

	/**
	 * 年度警告分类统计
	 * @return
	 */
	@GetMapping("/annualWarningStatisticsByCategory")
	public Result<?> annualWarningStatisticsByCategory(){
		return Result.success(service.annualWarningStatisticsByCategory());
	}
	/**
	 * 年度警告区域统计
	 * @return
	 */
	@GetMapping("/annualWarningAreaStatistics")
	public Result<?> annualWarningAreaStatistics(){
		return Result.success(service.annualWarningAreaStatistics());
	}

	/**
	 * 管制指令纠错
	 */
	@GetMapping("/findWarnTp")
	public Result<?> findWarnTp(){
		return Result.success(service.findWarnTp());
	}
}
